Fix crash when using Emacs as commit editor for git.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 Oct 2012 17:27:29 +0000 (10:27 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 31 Oct 2012 17:27:29 +0000 (10:27 -0700)
commita70012fceccccbf5ca46db92130fc9aa61cf933b
tree14e12091d78112633ec0b3b0e99e2ec4d19720d5
parent0f63337a3d5a85c9fa1c0f316f230ce6b6619653
Fix crash when using Emacs as commit editor for git.

* callproc.c (setpgrp): Remove macro, as we now use setpgid
and it is configured in conf_post.h.
(Fcall_process): Don't invoke both setsid and setpgid; the former
is enough, if it exists.
* callproc.c (Fcall_process, child_setup):
* process.c (create_process): Use setpgid.
* conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
for the real thing.
* dispnew.c (init_display): Initialize the foreground group
if we are running a tty display.
* emacs.c (main): Do not worry about setpgrp; init_display does it now.
* lisp.h (init_foreground_group): New decl.
* sysdep.c (inherited_pgroup): New static var.
(init_foreground_group, tcsetpgrp_without_stopping)
(narrow_foreground_group, widen_foreground_group): New functions.
(init_sys_modes): Narrow foreground group.
(reset_sys_modes): Widen foreground group.
src/ChangeLog
src/callproc.c
src/conf_post.h
src/dispnew.c
src/emacs.c
src/lisp.h
src/process.c
src/sysdep.c